package com.kitty.game.fight.reward;

import com.kitty.game.pet.model.Pet;
import com.kitty.game.role.model.Role;
import com.kitty.game.fight.bean.Fight;
import com.kitty.game.fight.reward.FightRewardHandler;
import com.kitty.game.equip.message.RespNotifyMiscEx;
import com.kitty.game.utils.Const;
import com.kitty.mina.message.MessagePusher;
import org.springframework.stereotype.Component;

@Component
public class SendPKRewardHandler extends FightRewardHandler {
    @Override
    public void sendReward(Fight fight, Role role, Pet pet) {
        sendMessage(role,"你在切磋战斗中胜利了！");
    }

    @Override
    public int getType() {
        return Const.fightType_PK;
    }

    @Override
    public void fightFailed(Fight fight, Role role) {
        sendMessage(role,"你在切磋战斗中败北了！");
    }

    @Override
    public void flee(Fight fight, Role role) {
        sendMessage(role,"你在切磋战斗中逃跑了...");
    }

    private void sendMessage(Role role ,String message){
        MessagePusher.pushMessage(role,new RespNotifyMiscEx(message));
    }
}
